﻿#ifndef TOMATOCLOCKFRAGMENT_H
#define TOMATOCLOCKFRAGMENT_H

#include <QWidget>
#include <QTimer>
#include <QTextToSpeech>
namespace Ui {
class TomatoClockFragment;
}

class TomatoClockFragment : public QWidget {
    Q_OBJECT
private:
    const int MODE_WORK = 0;
    const int MODE_REST = 1;
    Ui::TomatoClockFragment *ui;
    QTimer timer;
    int secondsRest;
    int currentMode;
    int workSec,restSec;
    bool paused = false;
private slots:
    void onTimerTimeout();

    void on_pushButton_start_clicked();

    void on_pushButton_stop_clicked();

    void on_pushButton_reset_clicked();

public:
    explicit TomatoClockFragment(QWidget *parent = nullptr);
    ~TomatoClockFragment();
    QTextToSpeech tts;

};

#endif // TOMATOCLOCKFRAGMENT_H
